class TLocation
{
public:
	TLocation() : m_i(0),m_j(0),m_z(0) {}
	TLocation(int i, int j, int z) : m_i(i),m_j(j),m_z(z) {}
	TLocation(TLocation& copy) {m_i=copy.m_i;m_j=copy.m_j;m_z=copy.m_z;}
	~TLocation() {}

	int m_i, m_j, m_z;
	void Set(int i,int j,int z) {m_i=i;m_j=j;m_z=z;}

	bool operator==(TLocation& loc)
	{
		return ( loc.m_i==m_i && loc.m_j==m_j && loc.m_z==m_z);
	}

	TLocation Below() {return TLocation(m_i,m_j,m_z-1);}

	
	void PT_Shift(int i, int j, int z) {m_i+=i;m_j+=j;m_z+=z;}
	
};

class TLocationPath : public TLocation
{
public:
	TLocationPath() : TLocation(), m_pathG(0),m_pathParent(NULL) {}
	TLocationPath(int i, int j, int z) : TLocation(i,j,z), m_pathG(0),m_pathParent(NULL) {}
	~TLocationPath() {}

	int m_pathG;
	int m_pathF;
	TLocationPath* m_pathParent;


	// quick method for pathfinder that allocates memory in heap for result
	TLocationPath* PT_ShiftAlloc(int i, int j, int z) {return new TLocationPath(m_i+i, m_j+j, m_z+z);}


};